    /**
 * Created by CodeTlan.
 * User: Ing. Miguel Salas
 * Date: 3/11/12
 * Time: 5:00 PM
 */
Ext.define('CT.view.departamento.Grid', {
    extend: 'Ctc.view.EditorGrid',
    alias: 'widget.griddepartamento',
    store:'Departamentos',
    requires: 'Ext.ux.grid.checkcolumn.CheckColumn',
    buildColumns: function(){
        return [
            { xtype: 'rownumberer'},
            { header: 'Nombre', dataIndex: 'nombre', flex: 1, editor: { allowBlank: false }},
            { dataIndex: 'activo', align: 'center', width: 40, xtype: 'checkcolumn', editor: { xtype: 'checkbox', cls: 'x-grid-checkheader-editor' }},
            { align: 'center', width: 40, renderer: this._renderEliminar, editor:{xtype:'hiddenfield'}}
        ];
    },
    buildTbar:function(){
        return[{
            xtype:'button',
            itemId:'btnCategorias',
            text:'Categorías',
            iconCls:'categorias',
            disabled:true,
            action:'addcategorias'
        }];
    },
    _renderEliminar:function(value){
        return "<img src='img/icons/16/del.png' style='cursor:pointer'>";
    }
});